package cn.jiyun.service;

import cn.jiyun.mapper.UserMapper;
import cn.jiyun.mapper.UsersMapper;
import cn.jiyun.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersMapper usersMapper;

    @Autowired
    private UserMapper userMapper;
    @Override
    public int addUsers(Users users) {
        return userMapper.insertSelective(users);
    }

    @Override
    public List<Users> queryUsers() {
        return userMapper.selectAll();
    }

    @Override
    public Users login(Users users) {
        Users users1=userMapper.selectOne(users);
        return users1;
    }
}
